package com.yjq.blog.user.config;

import com.yjq.blog.vo.AliMessage;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "aliyun.message")
public class AliMessageConfig {

    private String regionId;

    private String accessKeyId;

    private String secret;

    public AliMessage getAliMessage() {
        AliMessage aliMessage = new AliMessage();
        aliMessage.setRegionId(regionId);
        aliMessage.setAccessKeyId(accessKeyId);
        aliMessage.setSecret(secret);
        return aliMessage;
    }
}
